home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
turbosys.def
< prev
next >
Wrap
Text File
|
2000-09-26
|
6KB
|
265 lines
(*$S-, $R-, $A-, $T- *)
DEFINITION MODULE TurboSys;
FROM SYSTEM IMPORT ADDRESS;
CONST interruptVector = 0F1H;
memoryVector = 0F2H;
boolGadget = 0;
toggleGadget = 1;
strGadget = 2;
intGadget = 3;
propGadget = 4;
TYPE
STRING = POINTER TO ARRAY [0..79] OF CHAR;
WindowPtr = POINTER TO Window;
TurboDOSPtr = POINTER TO TurboDOS;
SysMsgPtr = POINTER TO SysMsg;
MenuPtr = POINTER TO Menu;
GadgetPtr = POINTER TO Gadget;
WindowFlags = (windowClose,windowDepth,windowSizing,windowDrag,
wf4,wf5,wf6,wf7,wf8,wf9,wf10,wf11,wf12,wf3,wf14,
requester);
WindowFlagSet = SET OF WindowFlags;
SysMsgClasses = (activateWindow,closeWindow,moveWindow,sizeWindow,
gadgetUp,menuPick,keyboard,sc7,
sc8,sc9,sc10,sc11,sc12,sc13,sc14,noWindow);
SysMsgClassSet = SET OF SysMsgClasses;
MouseButtons = (left,right,mid,
mb3,mb4,mb5,mb6,mb7,mb8,mb9,mb10,mb11,mb12,mb13,mb14,mb15);
MouseButtonSet = SET OF MouseButtons;
ItemFlags = (checkit,checked,disabled,menuBar,
if4,if5,if6,if7,if8,if9,if10,if11,if12,if13,if14,if15);
ItemFlagSet = SET OF ItemFlags;
Gadget = RECORD
nextGadget : GadgetPtr;
leftEdge,
topEdge,
width,
height : CARDINAL;
text : ARRAY [0..29] OF CHAR;
type : CARDINAL;
id : CARDINAL;
enabled : BOOLEAN;
buffer : STRING;
help : ARRAY [0..59] OF CHAR;
selected : BOOLEAN;
propV : BOOLEAN;
propMax,
propPos,
propButton,
propAdd : CARDINAL;
END (* RECORD *);
Window = RECORD
nextWindow : WindowPtr;
leftEdge,
topEdge,
width,
height : CARDINAL;
flags : WindowFlagSet;
title : ARRAY [0..29] OF CHAR;
minWidth,
minHeight : CARDINAL;
(* ----- interne Variablen --------- *)
buffer : ADDRESS;
bufferSize : CARDINAL;
cursorPos : CARDINAL;
frontPen : CARDINAL;
backPen : CARDINAL;
firstGadget : GadgetPtr;
firstMenu : MenuPtr;
maxWindow : BOOLEAN;
maxX,
maxY,
maxW,
maxH : CARDINAL;
sysGadgets : ARRAY [0..2] OF Gadget;
reserved : ARRAY [0..9] OF CARDINAL;
END (* RECORD *);
Menu = RECORD
nextMenu : MenuPtr;
leftEdge : CARDINAL;
title : ARRAY [0..19] OF CHAR;
info : ARRAY [0..59] OF CHAR;
itemLeftEdge : CARDINAL;
itemWidth : CARDINAL;
itemCount : CARDINAL;
items : ARRAY [0..19] OF ARRAY [0..29] OF CHAR;
flags : ARRAY [0..19] OF ItemFlagSet;
help : ARRAY [0..19] OF ARRAY [0..59] OF CHAR;
END (* RECORD *);
SysMsg = RECORD
class : SysMsgClassSet;
window : WindowPtr;
code,
scancode : CARDINAL;
gadget : GadgetPtr;
gadgetID,
gadgetPos : CARDINAL;
gadgetSelected : BOOLEAN;
menuNum : CARDINAL;
itemNum : CARDINAL;
END (* RECORD *);
TurboDOS = RECORD
(* ----- interne Variablen --------- *)
id : ARRAY [0..3] OF CHAR;
version : CARDINAL;
active : BOOLEAN;
(* ----- öffentliche Variablen ----- *)
firstWindow : WindowPtr;
message : SysMsg;
help : ARRAY [0..79] OF CHAR;
buffer : ADDRESS;
videoWidth,
videoHeight,
videoMaxX,
videoMaxY,
videoBPR,
videoSize,
videoMode : CARDINAL;
cursorPos : CARDINAL;
mouseX,
mouseY : CARDINAL;
mouseButtons : MouseButtonSet;
mouseLock : CARDINAL;
buttonCount : CARDINAL;
patternScreenBackgrnd,
patternWindowBackgrnd,
colorScreenBackgrnd,
colorHelpBar,
colorMove,
colorWindowBackgrnd,
colorAWindowBorders,
colorIWindowBorders,
colorWindowAPen,
colorWindowBPen,
colorGadget,
colorGadgetSelected,
colorGadgetDisabled,
colorMenuBar,
colorMenuEnabled,
colorMenuDisabled,
colorMenuSelected,
colorMenuBorder : CARDINAL;
END (* RECORD *);
CONST
stdItem = ItemFlagSet{};
bar = ItemFlagSet{menuBar};
check = ItemFlagSet{checkit,checked};
VAR tdos : TurboDOSPtr;
(* ----- Graphics-Library -------------------- *)
PROCEDURE WriteText(a,x,y : CARDINAL;
text : STRING);
PROCEDURE Fill(attribut,
x,y,w,h,
zeichen : CARDINAL);
PROCEDURE SetCursor(x,y : CARDINAL);
PROCEDURE RestoreCursor;
PROCEDURE CopyVideo2Buffer(buffer : ADDRESS;
x,y,w,h : CARDINAL);
PROCEDURE CopyBuffer2Video(buffer : ADDRESS;
x,y,w,h : CARDINAL);
PROCEDURE DrawX(farbe,x,y,l,zeichen : CARDINAL);
PROCEDURE DrawY(farbe,x,y,l,zeichen : CARDINAL);
(* ----- Mouse-Library ----------------------- *)
PROCEDURE MouseReset;
PROCEDURE MouseOn;
PROCEDURE MouseOff;
PROCEDURE GetMousePosition(VAR x,y : CARDINAL;
VAR b : MouseButtonSet);
(* ----- Display-Library --------------------- *)
PROCEDURE OpenScreen;
PROCEDURE CloseScreen;
PROCEDURE OpenWindow(titel : ARRAY OF CHAR;
x,y,w,h : CARDINAL;
flgs : WindowFlagSet;
mw,mh : CARDINAL) : WindowPtr;
PROCEDURE SetAPen(farbe : CARDINAL);
PROCEDURE SetBPen(farbe : CARDINAL);
PROCEDURE Move(x,y : CARDINAL);
PROCEDURE Text(text : ARRAY OF CHAR);
PROCEDURE ShowMenu(menu : MenuPtr);
PROCEDURE SystemManager;
PROCEDURE ShowHelp(t1,t2 : ARRAY OF CHAR);
PROCEDURE ShowGadget(gad : GadgetPtr);
PROCEDURE MoveWindow(x,y : CARDINAL);
PROCEDURE SizeWindow(w,h : CARDINAL);
PROCEDURE CloseWindow;
PROCEDURE CenterText(y : CARDINAL;
text : ARRAY OF CHAR);
PROCEDURE ModifyProp(gad : GadgetPtr;
pos,max : CARDINAL);
PROCEDURE LineH(x,y,l : CARDINAL);
PROCEDURE LineV(x,y,l : CARDINAL);
PROCEDURE Char(x,y,zeichen : CARDINAL);
PROCEDURE Box(x,y,w,h : CARDINAL);
PROCEDURE ExecuteApplication(name : ARRAY OF CHAR;
args : ARRAY OF CHAR;
dos : BOOLEAN) : CARDINAL;
END TurboSys.